-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(24.04): add iptables, sudo and add mutation script for pam-auth-update #306
feat(24.04): add iptables, sudo and add mutation script for pam-auth-update #306
Conversation
Diff of dependencies: slices/libpam-runtime.yaml@@ -1,4 +0,0 @@
-cdebconf
-debconf
-debconf-2.0
-libpam-modules |
208baa2
to
43d744c
Compare
43d744c
to
785b4eb
Compare
e6fa58c
to
1f3198b
Compare
@Meulengracht following up on this - it'd be nice to try these tests with LXD as well, once we get sort out why you're having those issues in #318 |
f8a92f6
to
01961a9
Compare
It passes on the LXD backend locally, I removed the caps and restored the tests |
@cjdcordeiro @rebornplusplus this is ready for review |
29dbbc6
to
899c46a
Compare
… modify the pam-defaults to actually deliver working files instead
899c46a
to
0280ed7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's all good to me, but I just have a final comment and need a 2nd review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just small nitpicks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks quite nice, thank you! Impressive work on the mutation script.
I think the only thing major in my comments below is the future of pam-defaults
slice. Let's reach a conclusion on that. And then, I think we can merge it.
Co-authored-by: Rafid Bin Mostofa <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice. Just checked the output of the pam-auth-update
from a fresh container, and we have a set of diverged pam configs. The reason is that pam-auth-update
reads the values from *-Initial
for the first pam config of each kind.
320 # return the lines for a given config name, type, and position in the stack
321 sub lines_for_module_and_type
322 {
323 my ($profiles, $mod, $type, $modpos) = @_;
324 if ($modpos == 0 && $profiles->{$mod}{$type . '-Initial'}) {
325 return $profiles->{$mod}{$type . '-Initial'};
326 }
327 return $profiles->{$mod}{$type};
328 }
Co-authored-by: zhijie-yang <[email protected]>
Add -Initial suffix to mutation scritps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor changes are required for the linting and tests. @cjdcordeiro
Co-authored-by: zhijie-yang <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thanks for the changes!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is in a good state now. It would be nice to also have a final pass from @clay-lake
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved! :) I'm a little concerned with the mutation script due its complexity. The current output seems consistent with what I expect in a fresh noble container, and the script should work in a fresh rootfs. Not now, but we might want to consider refactoring it if we need to adapt it in the future. Maybe something like this? I made some changes while reviewing the script.
thanks @clay-lake |
…update (canonical#306) --------- Co-authored-by: Cristovao Cordeiro <[email protected]> Co-authored-by: Rafid Bin Mostofa <[email protected]> Co-authored-by: zhijie-yang <[email protected]> feat(24.04): add slices for gearman-job-server and dependencies feat(24.04): add slices for gearman-job-server and dependencies Added bins and services slice for gearman-job-server feat(24.04): add slices for gearman-job-server and dependencies Update format to match codebase feat(24.04): add slices for gearman-tools and dependencies feat(24.04): add slices for Gearman and dependencies
Proposed changes
Iptables is something we include in Ubuntu Core. Unfortunately to test iptables I need both sudo (which I then figured wasn't working due to bad libpam support), which resulted in a large mutation script that emulates what pam-auth-update does.
There are dedicated integration tests for the libpam generation and sudo, and the test for iptables currently is pretty shallow since it needs kernel modules loaded that aren't available.
Checklist